<!-- 屈光发育档案/角塑复查(复查档案) -->
<template>
  <div class="mod-config" style="padding: 0 15px;">
      <el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
        <el-tab-pane label="复查档案" name="first">
          <ck-corneal ref="first"></ck-corneal>
        </el-tab-pane>
        <el-tab-pane label="复查预警" name="second">
          <return-corneal ref="second"></return-corneal>
        </el-tab-pane>
      </el-tabs>
  </div>
</template>
<script>
  import CkCorneal from './index'
  import ReturnCorneal from './returnIndex'
  export default {
    data() {
      return {
        activeName: 'first'
      };
    },
    components: {
      CkCorneal,
      ReturnCorneal
    },
    created(){
      this.$nextTick(() => {
        this.$refs.first.init()
      })
    },
    methods: {
      handleClick(tab, event) {
        if (tab.name == "first") {
          this.$refs.first.init()
        } else if (tab.name == "second") {
          this.$refs.second.init()
        }
      }
    }
  };
</script>
